package projectTurtle;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import module4.*;

public class TestFrameUI extends JFrame 
{
	StockSearchPanel ssp=null;
	
	
	public TestFrameUI(Connection Conn) 
	{
		
			
				//TestFrameUI tf = new TestFrameUI(Conn);
				ssp = new StockSearchPanel(Conn);
				this.setTitle("Stock Items");
				this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
				this.getContentPane().add(ssp, BorderLayout.CENTER);
				this.setSize(800,600);
				this.setLocationRelativeTo(null);
				this.setVisible(true);

	}


	public static void main(String[] args) 
	{
		String myDriver = "com.mysql.jdbc.Driver";
		String ipOfDB = "localhost";
		MySQLdriverConnection msc;
		Connection Conn;
			try
			{
				msc = new MySQLdriverConnection("","",ipOfDB,"turtleData");
				Conn = msc.getConnection();
				new TestFrameUI(Conn);
			}
			catch(SQLException sqlE)
			{
				
				sqlE.printStackTrace();
			}	
			catch(ClassNotFoundException cnfe)
			{
				cnfe.printStackTrace();
			}
	
	}
}


